The present invention relates to a controller and more particularly to a controller and control method for processing logical elements of a computer memory.
Reference is made throughout this specification to the use of objects and object oriented (OO) methodologies. It will however be appreciated, that the current invention is not software but a method for optimising use of system resources in an object oriented environment.
Object orientation, the technology based on objects and classes presently represents the best methodological framework for software engineering. Furthermore, its pragmatics provide the foundation for a systematic engineering discipline. By providing class support, for objects and classes of objects of an application, the object-oriented paradigm precepts more accurate modelling and implementation of systems. Use of these objects provide a canonical focus throughout the processes of analysis, design, and implementation by emphasizing the state, behaviour, and interaction of objects in its models.
Object-orientation works with both problem/solution and deliverables to provide a complete and comprehensive systemic approach to software development. The area of applicability for object oriented applications is very large and ranges from real-world application domain modelling and enterprise engineering to the use of polymorphism in programs and the architecture, modelling and implementation of the systems that run beneath them and the distributed systems that connect them. It is widely accepted that object orientation thus offers a better paradigm than that of structured techniques by providing significant improvement in basic component definition and interfacing. The applicability of object structures is perhaps most evident in improved interfaces, as interface objects provide connections to underlying objects. These underlying objects represent the conceptually complete components of a system and can be individually understood, combined, integrated and arranged in wide variety of configurations.
The principle advantages of object oriented methodologies are reuse, quality, stronger equivalence to the real world than other methodologies promoting xe2x80x9cnaturalnessxe2x80x9d, encapsulation and higher cohesion/lower coupling. Object oriented systems are very resistant to change given that system objects change infrequently while processes and procedures in other paradigms are frequently changed, providing object-oriented systems with more resilient system organisation. Other advantages of object oriented code are faster development times, increased quality, easier maintenance and enhanced modifiability.
While object oriented applications are thus enormously useful in implementing systems they do suffer from a number of problems. For example when an object or sub object is required, it is loaded into computer read/write memory and used by the system as appropriate. When the object task is completed the system performs a check to determine whether any other object in the system refers to that object and releases it only if no pointers are found. This is wasteful of memory and thus adversely affects system performance in that frequently objects remain memory resident unnecessarily.
Another problem occurs in applications where the modelled system requires the use of a database, developments to the specification frequently require modifications to the database structure. Changes of this type necessitate using developers of considerable skill and thus greatly increases the cost and development time required for an application amendment.
A number of possible solutions to this particular problem have been proposed. One suggested method is to make use of an automated code generator to incorporate database modifications. The disadvantage in such an approach is that significant amendments to the source code are required. Once such amendments are necessary and have been made the code must be manually re-compiled and tested. This obviously increases modification costs and incurs what are often unacceptable delays. Furthermore, it raises maintainability issues, which in the light of year two thousand problems are becoming very important to the industry. In addition while these code generators work well with a small number of standard modifications their scope of reliable operation is limited. The only other alternative to these techniques is to manually recode the amendments by hand with obvious disadvantages. The ability to handle these amendments accurately and efficiently has a significant impact on data mapped to the database. Aspects of this problem are addressed in European Patent Application Number EP 0 690 375 IBM (International Business Machines Corporation). While the document discloses a method and system for mapping data in an object oriented environment (OOE) it does not address the particular problems described above. Another IBM application European Patent Application Number EP 0 684 569 shows a method for managing connections to a database for concurrent users in an OOE but again does not address the issues of resource optimisation to make ensure optimum use of memory and maintainability.
There is therefore a need for a controller which will address these requirements and overcome the aforementioned problems.
Accordingly there is provided a controller for use in an object oriented environment having means for connecting an information interface for a network user to a database for recording data entered by the network user and means for optimising memory usage in the object oriented environment performing the steps of:
receiving an object generation request from the information interface, automatically interrogating the received object generation requests to establish the existence of an associated sub-object and generating a sub-object exist code;
generating an object in a memory in response to the generation request and on receipt of a sub-object exist code automatically encoding the object with a container register and initialising an object stack;
processing data transfers between the information interface and the database until an object release request is received;
opening a driver object in response to the received object release request and generating a list of sub-objects for the driver object by referencing the container register;
indexing the list of sub-objects to the object stack and iteratively and sequentially reading the object stack to locate an object container register and generate an object container register detect signal;
iteratively detecting object container register detect signals and automatically opening each object in turn associated with an object container register, generating a list of sub-objects for the driver object of that object and indexing the list of sub-objects to the object stack and reading the object stack to locate further object container registers and generating an object container register detect signals; and
generating a stack complete signal in response to the absence of further object container register detect signal indicating that all objects to be closed are listed in the object stack and processing the stack to delete all referenced objects.
It will thus be appreciated that by the relatively simple expedient of automatically assigning an encoded container register that all referenced objects to be closed are in fact closed. This both enhances system operations by ensuring maximum availability of resources and allows modelled systems to be run on smaller scale systems as memory usage is optimised. In prior art systems the inefficient use of memory meant that the computer used to model a given system had of necessity to be overspecified. This significantly increases costs and thus limits the accessibility of such systems to a wide range of potential users.
Preferably the controller further incorporates means for simulating a three tier client server object oriented environment of the having inter-tier communication, a front tier being connected to the information interface, a back tier being connected to the database and a middle tier providing a class structure of inter-operable objects communicating with the front tier and the back tier characterised in that the class structure is retrieved from a database table. This is an important feature of the current invention in that by retrieving the class structure in this manner problems of data field updates are overcome and additionally changes to the structure can be accommodated with absolute ease.
Ideally the means for simulating a three tier client server object oriented environment further incorporates means for performing the steps of:
creating an initial internal structure in the middle tier built from class definitions stored in a database table; and
creating objects at run time based on the class structures, the class structure reflecting the hierarchical structure that exists between entities in the database.
This allows for abstraction in load and save routines, so that no specific coding for specific classes is required. This significantly reduces the time taken to implement database structure changes. Furthermore, the skill level required to accurately implement such changes is significantly reduced and thus costs are minimised.
Preferably objects are created in the middle tier using values for a class name, an instance id, and field names automatically retrieved through a defined interface from the table.